/*
 * Copyright (c) 2018, apexes.net. All rights reserved.
 *
 *         http://www.apexes.net
 *
 */
package net.apexes.demo.query;

import com.j256.ormlite.support.ConnectionSource;
import com.j256.ormlite.table.TableUtils;
import net.apexes.demo.codegen.enume.support.DemoEnumeSupport;
import net.apexes.demo.codegen.ormlite.annotation.entity.Pay;
import net.apexes.demo.codegen.util.DemoDatabases;

/**
 * @author <a href="mailto:hedyn@foxmail.com">HeDYn</a>
 *
 */
public class OrmliteAnnotationDemo {
    
    public static void main(String[] args) throws Exception {
        DemoEnumeSupport.getInstance().registerDataPersisters();
        try (ConnectionSource connSource = DemoDatabases.createConnectionSource()) {
            testSelect(connSource);
        }
    }
    
    static void testSelect(ConnectionSource connSource) throws Exception {
        TableUtils.createTableIfNotExists(connSource, Pay.class);
    }

}
